#!/bin/bash

# 源文件路径
SPINLOCK_FILE="../../src/locks/spinlock.c"

# 使用VSync分析当前实现
echo "Analyzing current implementation..."
vsyncer info $SPINLOCK_FILE

# 使用VSync优化
echo "Optimizing spinlock implementation..."
vsyncer optimize -A -1 $SPINLOCK_FILE

# 验证优化结果
echo "Verifying optimization..."
vsyncer verify $SPINLOCK_FILE 